feat(core): M4 — skills + sub-agents + output styles loaders#5
Merged
Conversation
Implements docs/DEVELOPMENT_PLAN.md §3.13 / §3.13a / §3.13b loaders.
Shipped
-------
- skills/frontmatter.ts (115 lines)
Zero-dep YAML frontmatter parser supporting the subset SKILL.md / sub-agent /
output-style files actually use: strings (quoted or bare), numbers, booleans,
flow-style arrays ["a","b"], block-style arrays, simple block objects.
- skills/loader.ts (110 lines)
4-layer loader: builtin (compiled-in dir) / user (~/.deepcode/skills/) /
project (<cwd>/.deepcode/skills/) / plugin (<plugin>/skills/, name prefixed
with `<plugin>:`). Honors `disabled: true` in frontmatter + settings.json
`skillOverrides[name].disabled`. `buildSkillsDescriptionBlock()` produces
the system-prompt fragment listing name+description (body loaded on invoke).
- sub-agents/loader.ts (75 lines)
Loads .deepcode/agents/*.md. Frontmatter spec: name / description / tools[] /
model / isolation (subprocess|worktree|none) / maxTurns. Supports CLI
--agents <dir> override via projectDirOverride option. findSubAgent() helper.
- output-styles/loader.ts (105 lines)
4 built-in styles (default / explanatory / learning / proactive) from
§3.13b. User → project layer replacement semantics. applyStyle(base, style)
appends body to system prompt; respects keep-coding-instructions frontmatter.
Top-level @deepcode/core re-exports all M4 surfaces.
Tests
-----
- frontmatter.test.ts (10) — quoted strings, booleans, numbers, both array
styles, block objects, comments, malformed
- loader.test.ts ( 9) — user/project sources, plugin qualification,
tools/effort/model frontmatter, disabled filter,
malformed skip, override gate
- sub-agents/loader.test.ts ( 6) — all frontmatter fields, layer ordering,
projectDirOverride, findSubAgent
- output-styles/loader.test.ts (9) — 4 builtins, user override displaces
builtin, project displaces user,
applyStyle composition
Total: 240 passed / 4 skipped / 0 failed (was 206).
Deferred
--------
- 15 built-in skill markdown FILES (loader finds whatever's on disk; content
authoring is out-of-band, not engineering work).
- `Skill` tool for invocation (M5 — will inject skill body into next turn's
system messages).
- REPL plumbing for skill-frontmatter effort overrides (paired with Skill tool).
- `auto` classifier mode (M3c).
Verified
--------
pnpm typecheck → green
pnpm test → 240 passed / 4 skipped
pnpm format:check → conformant
Docs
----
- docs/milestones/M4.md — delivery report + deferred items
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Skilltool for invocation in M5.Release notes
release-notes:featureCo-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com